const routes = [
  {
    path: '/footer',
    name: 'footer',
    component: () => import('../views/Footer.vue'),
    children: [
      {
        path: '/footer/host',
        name: 'host',
        meta:{title:'首页'},
        component:()=>import('../views/Footer/Host.vue')
      },
      {
        path: '/footer/tuan',
        name: 'tuan',
        mate: { title: '爆爆团' },
        component:()=>import('../views/Footer/Tuan.vue')
      },
      {
        path: '/footer/mine',
        name: 'mine',
        meta:{title:'我的'},
        component:()=>import('../views/Footer/Mine.vue')
      },
      {
        path: '/footer/list',
        name: 'list',
        meta:{title:'我的'},
        component:()=>import('../views/Footer/List.vue')
      },
      {
        path: '/footer',
        redirect:'/footer/host'
      },
      {
        path: '*',
        component:()=>import('../views/NotFound.vue')
      }
    ]
  },
  {
    path: '/login',
    name: 'login',
    meta:{title:'登录页'},
    component: () => import('../views/Login.vue')
  },
  {
    path: '/more/:id',
    name: 'more',
    meta:{title:'详情页'},
    component:()=>import('../views/More.vue')
  },
  {
    path: '/love',
    name: 'love',
    meta:{title:'收藏'},
    component:()=>import('../views/Love.vue')
  },
  {
    path: '/search',
    name: 'search',
    meta:{title:'搜索'},
    component:()=>import('../views/Search.vue'),children: [
      {
        path: '/search/all',
        name: 'all',
        component:()=>import('../views/Search/All.vue')
      },
      {
        path: '/search/history',
        name: 'history',
        component:()=>import('../views/Search/History.vue')
      },
      {
        path: '*',
        component:()=>import('../views/NotFound.vue')
      },
      {
        path: '/search',
        redirect:'/search/history'
      },
    ]
  },
  {
    path: '/resgiter',
    name: 'resgiter',
    meta:{title:'注册'},
    component:()=>import('../views/Resgiter.vue')
  },
  {
    path: '/address',
    name: 'address',
    meta:{title:'我的地址'},
    component:()=>import('../views/Address.vue')
  },
  {
    path: '/newadd',
    name: 'newadd',
    meta:{title:'新增地址'},
    component:()=>import('../views/Newadd.vue')
  },
  {
    path: '/modify',
    name: 'modify',
    meta: {title: '修改地址'},
    component:()=>import('../views/Modify.vue')
  },
  {
    path: '/',
    redirect:'/footer'
  },
  {
    path: '*',
    component:()=>import('../views/NotFound.vue')
  }
]

export default routes; 